package com.szit.deviceclient.feign;

import com.szit.deviceclient.feign.fallback.UserFeignFallbackFactory;
import com.szit.util.Result;
import com.szit.util.vo.DeviceUserInfo;
import com.szit.util.vo.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author wyler
 * @date 2020-10-15
 */
@FeignClient(value = "device-server",fallback = UserFeignFallbackFactory.class)
public interface UserFeign {

    @PostMapping("insertDeviceUser")
    @ResponseBody
    Result insertDeviceUser(@RequestBody DeviceUserInfo deviceUserInfo);

    @PostMapping("deleteDeviceUser")
    @ResponseBody
    Result deleteDeviceUser(@RequestBody DeviceUserInfo deviceUserInfo);

    @PostMapping("updateDeviceUser")
    @ResponseBody
    Result updateDeviceUser(@RequestBody DeviceUserInfo deviceUserInfo);

    @PostMapping("selectAllDeviceUser")
    @ResponseBody
    Result selectAllDeviceUser(@RequestParam Integer pageNum, @RequestParam Integer pageSize);
}
